package org.forwhat.dao.Impl;

import org.forwhat.dao.WhatPostTagDao;
import org.forwhat.framework.annotation.Data;
import org.forwhat.framework.annotation.InsertBean;

/**
 * @projectName: ForWhat
 * @package: org.forwhat.dao.Impl
 * @className: WhatPostTagDaoImpl
 * @author: LGJ
 * @description: TODO
 * @date: 2023/12/2 9:11
 * @version: 1.0
 */
//@Data("WhatPostTagDaoImpl")
public class WhatPostTagDaoImpl implements WhatPostTagDao {
    @InsertBean("BaseDaoImpl")
    private BaseDaoImpl baseDaoImpl;
    public BaseDaoImpl getBaseDaoImpl() {
        return baseDaoImpl;
    }

    public void setBaseDaoImpl(BaseDaoImpl baseDaoImpl) {
        this.baseDaoImpl = baseDaoImpl;
    }
    @Override
    public int insertPostAndTagConnection(String postId, String tagTitle) {

            return baseDaoImpl.update("insert into what_post_tag value (?,?)",tagTitle,postId);

    }
}
